<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div class="modal-dialog demo2do-modal-dialog" style="width: 1000px">

  <div class="modal-content">

    <div class="modal-header beast-breadcrumb no-bottom-border clearfix">

      <h2><i class="glyphicon glyphicon-fire" title=""></i>&nbsp;&nbsp;<span>广告主列表&nbsp;-&nbsp;新建广告主</span></h2>

      <button type="button" class="close" data-dismiss="modal">&times;</button>

    </div>
          
    <form class="form-horizontal" method="POST" action="${ctx.host}/adusers" data-validate="true">
      <div class="form-horizontal bottom-margin-20">
      
        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label"><strong>个人信息</strong></label>
        </div>
        
        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label">注册手机：</label>
          <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="profile.userName" data-validate="required|mobile"/>
          </div>
          <label class="col-xs-2 control-label">联系方式：</label>
          <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="mobile" data-validate="required|mobile"/>
          </div>
        </div>
	      <div class="form-group demo2do-form-group">
	        <label class="col-xs-2 control-label">联系人：</label>
	        <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="profile.nickName"/>
          </div>
        </div>
        
        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label"><strong>企业信息</strong></label>
        </div>
      
        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label">公司全称：</label>
          <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="company.name"/>
          </div>
          <label class="col-xs-2 control-label">公司电话：</label>
          <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="company.phone" data-validate="mobile"/>
          </div>
        </div>
       
        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label">企业官网：</label>
          <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="company.website" data-validate="www"/>
          </div>
          <label class="col-xs-2 control-label">企业邮箱：</label>
          <div class="pull-left" style="width: 30%">
            <input type="email" class="form-control" name="company.email" data-validate="email"/>
          </div>
        </div>
       
        <div class="form-group demo2do-form-group">
          <label class="col-xs-2 control-label">企业QQ：</label>
          <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="company.qq" data-validate="number"/>
          </div>
          <label class="col-xs-2 control-label">企业地址：</label>
          <div class="pull-left" style="width: 30%">
            <input type="text" class="form-control" name="company.address"/>
          </div>
        </div> 
      </div>  
      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success demo2do-btn">新建</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default demo2do-btn" data-dismiss="modal">取消</button>
      </div>
    </form>
    
  </div>
</div>

<script src="${ctx.resource}/js/bootstrap.validate.trigger.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
       $('form').shiftform({
       	beforeSubmit:function(el){
          $('form').trigger("validate.ajax.submit");
       		return $.bt_validate.result[$.bt_validate.form_id] 		
       	}
       });
    });
</script>
          
       
